function search(){
	if (document.getElementById("username").value.search(/\w+([-+.]\w+)*@?\w+([-.]\w+)*\.\w+([-.]\w+)*?/)!=-1) {
		if(document.getElementById("password").value.replace(/ */,"").length > 0){
			document.getElementById("username").value = document.getElementById("username").value.match(/\w+([-+.]\w+)*@?\w+([-.]\w+)*\.\w+([-.]\w+)*/)[0];
			document.getElementById("myform").submit();
		}
	}
	
}
